#include<stdio.h>
#include<stdlib.h>
int main()
{
	int n,sum=0,r=1;
	printf("input n:");
	scanf("%d", &n);
	do
	{
		sum = sum + r;
		r++;
	} while (r <= n);
	printf("sum=%d", sum);
	system("pause");
	return 0;
}